<script setup>
import { ref, computed } from "vue"

const price = ref(0)
const number = ref(0)

const total = computed(() => {
    return price.value * number.value
})

</script>

<template>
    <input v-model="price" />
    <input v-model="number" />
    <p>总价：{{ total }}</p>
</template>